<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<title>Title</title>
<link rel="stylesheet" href="${ctxPath}/static/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="${ctxPath}/static/font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container-fluid">
	<div class="row">
	<div class="col-md-3">
		<div class="panel panel-primary">
		  <div class="panel-body">
			 <div id="main" style="width:100%;height:300px;"></div>
		  </div>
		</div>
	</div>
	<div class="col-md-3">
		<div class="panel panel-primary">
		  <div class="panel-body">
			 <div id="main1" style="width: 100%;height:300px;"></div>
		  </div>
		</div>
	</div>
	<div class="col-md-3">
		<div class="panel panel-primary">
		  <div class="panel-body">
			 <div id="main2" style="width: 100%;height:300px;"></div>
		  </div>
		</div>
	</div>
	<div class="col-md-3">
		<div class="panel panel-primary">
		  <div class="panel-body">
			 <div id="main3" style="width: 100%;height:300px;"></div>
		  </div>
		</div>
	</div>
	</div>
</div>
<script type="text/javascript"
	src="${ctxPath}/static/jquery-2.1.4/jquery.min.js"></script>
<script type="text/javascript"
	src="${ctxPath}/static/echarts.min.js"></script>	
<script type="text/javascript"
	src="${ctxPath}/static/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript"
	src="${ctxPath}/static/util.js"></script>
	<script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));
        var myChart1 = echarts.init(document.getElementById('main1'));
        var myChart2 = echarts.init(document.getElementById('main2'));
        var myChart3 = echarts.init(document.getElementById('main3'));
        // 指定图表的配置项和数据
        var option = {
            title: {
                text: 'ECharts 入门示例XXXXXXXXXXX',
                left:'center'
            },
            tooltip: {},
            legend: {
                data:['销量','价格'],
                bottom:10
            },
            xAxis: {
                data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
            },
            toolbox:{
            	show:true,
            	orient:'vertical',
            	feature: {
                    dataView: { //数据视图
                        show: true
                    },
                    restore: { //重置
                        show: true
                    },
                    dataZoom: { //数据缩放视图
                        show: true
                    },
                    saveAsImage: {//保存图片
                        show: true
                    },
                    magicType: {//动态类型切换
                        type: ['bar', 'line']
                    }
                }
            },
            yAxis: {},
            series: [{
                name: '销量',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20]
            },{
                name: '价格',
                type: 'bar',
                data: [4, 30, 32, 15, 10, 23]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        myChart1.setOption(option);
        myChart2.setOption(option);
        myChart3.setOption(option);
    </script>
</body>
</html>